package Singleton;

/**
 * @author duanzhizhou
 * @date 2024/10/17
 */
public class Lazy {
    
    private volatile static Lazy instance;
    
    private Lazy() {
    }
    
    public static Lazy getInstance() {
        if (instance == null) {
            synchronized (Lazy.class) {
                if (instance != null) {
                    instance = new Lazy();
                }
            }
        }
        return instance;
    }
}
